//
//  MCActivityStatisticsSectionView.swift
//  StoreManage
//
//  Created by MC on 2018/6/25.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit





class MCActivityStatisticsSectionView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        
        self.backgroundColor = UIColor.MCGray_light
        
        
        self.addSubview(titleLabel)
        titleLabel.snp.remakeConstraints { (make) ->Void in
            make.left.right.equalTo(self)
            make.top.equalTo(self).offset(6)
            make.height.equalTo(44)
        }
        
        self.addSubview(nameLabel)
        nameLabel.snp.remakeConstraints { (make) ->Void in
            make.left.bottom.equalTo(0)
            make.top.equalTo(titleLabel.snp.bottom)
            make.width.equalTo(MCScreenWidth*0.6)
        }
        
        self.addSubview(countLabel)
        countLabel.snp.remakeConstraints { (make) ->Void in
            make.bottom.equalTo(0)
            make.top.equalTo(titleLabel.snp.bottom)
            make.left.equalTo(nameLabel.snp.right)
            make.width.equalTo(MCScreenWidth*0.2)
        }
        
        self.addSubview(explainButton)
        explainButton.snp.remakeConstraints { (make) ->Void in
            make.bottom.equalTo(0)
            make.top.equalTo(titleLabel.snp.bottom)
            make.right.equalTo(self)
            make.width.equalTo(MCScreenWidth*0.2)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    lazy var titleLabel: MCLabel = {
        let label = MCLabel()
        label.font = MCFont(16)
        label.backgroundColor = UIColor.white
        return label
    }()
    
    lazy var nameLabel: MCLabel = {
        let label = MCLabel()
        label.font = MCFont(15)
        label.text = "订单状态"
        label.textAlignment = NSTextAlignment.center
        return label
    }()
    
    lazy var countLabel: MCLabel = {
        let label = MCLabel()
        label.font = MCFont(15)
        label.text = "订单数量"
        label.textAlignment = NSTextAlignment.center
        return label
    }()
    
    
    lazy var explainButton: UIButton = {
        let button = UIButton.init(type: UIButtonType.custom)
        button.titleLabel?.font = MCFont(15)
        button.setTitle("明细", for: .normal)
        button.setTitleColor(UIColor.MCWords, for: .normal)
        return button
    }()
    
}

